<?php
$money = '16345';
echo '01234567890<br/>';
$money1 = 300;
$money2 = 300.0;
$formatted[] = sprintf("|%+'09.2f", $money1);
$formatted[] = sprintf("|%09.2f", $money1);
$formatted[] = sprintf("|%01.2f", $money2);

foreach ($formatted as $f) {
	echo $f.'<br/>';
}


echo sprintf ("|%+4d|%+4d|<br/>",   1, -1);
echo sprintf ("|%-4d|%-4d|<br/>",   1, -1);
echo sprintf ("|%+-4d|%+-4d|<br/>", 1, -1);

echo  sprintf("%d万<br/>", $money / (1e4));

$index = '01' +1;
var_dump(sprintf('%02d', $index), $index);